home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_13_11 / phillip2 / rstring.c < prev    next >
C/C++ Source or Header  |  1993-05-11  |  1KB  |  58 lines

  1.  
  2.         /*****************************************************
  3.         *
  4.         *       file d:\cips\rstring.c
  5.         *
  6.         *       Functions: This file contains
  7.         *            clear_buffer
  8.         *            long_clear_buffer
  9.         *            my_clear_text_screen
  10.         *
  11.         *       Purpose: This function reads a string of input
  12.         *            from the keyboard.
  13.         *
  14.         *******************************************************/
  15.  
  16. #include "cips.h"
  17.  
  18.  
  19.  
  20.  
  21.  
  22. clear_buffer(string)
  23.    char string[];
  24. {
  25.    int i;
  26.    for(i=0; i<MAX_NAME_LENGTH; i++)
  27.       string[i] = ' ';
  28. }
  29.  
  30.  
  31.  
  32. long_clear_buffer(string)
  33.    char string[];
  34. {
  35.    int i;
  36.    for(i=0; i<300; i++)
  37.       string[i] = ' ';
  38. }
  39.  
  40.    /*************************************************
  41.    *
  42.    *   my_clear_text_screen()
  43.    *
  44.    *   This calls Microsoft C functions to clear
  45.    *   the text screen and set a blue background
  46.    *   with gray text.
  47.    *
  48.    **************************************************/
  49.  
  50.  
  51. my_clear_text_screen()
  52. {
  53.    _setvideomode(_TEXTC80);/* MSC 6.0 statements */
  54.    _setbkcolor(1);
  55.    _settextcolor(7);
  56.    _clearscreen(_GCLEARSCREEN);
  57. }  /* ends clear_text_screen */
  58.